package cn.dbqn.controller;

import cn.dbqn.entity.Everyday;
import cn.dbqn.entity.View_gsxx;
import cn.dbqn.service.EverydayService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

@Controller
public class EverydayController {
    @Resource
    EverydayService everydayService;

    @RequestMapping("/listrc")
    public String list(Model model){
        List<Everyday> list=everydayService.findAllRc();
        model.addAttribute("list",list);
        return "lyear_pages_doc";
    }

    @ResponseBody
    @RequestMapping("rcxx")
    public Object rcxx(Integer hno){
        Everyday rcxx=everydayService.rcxx(hno);

        return rcxx;
    }


}
